import request from "@/utils/request";
import { parseStrEmpty } from "@/utils/ruoyi";

// 贷超链接配置新增、修改
export function addOrEdit(data) {
  return request({
    url: "/config/downPickUrl/v1.0.0/addOrEdit",
    method: "post",
    data: data,
  });
}
// 贷超链接配置删除
export function deleteById(id) {
  return request({
    url: "/config/downPickUrl/v1.0.0/deleteById",
    method: "get",
    params: {
      id: parseStrEmpty(id),
    },
  });
}
// 贷超链接配置详情
export function queryById(id) {
  return request({
    url: "/config/downPickUrl/v1.0.0/queryById",
    method: "get",
    params: {
      id: parseStrEmpty(id),
    },
  });
}
// 贷超链接配置分页查询
export function queryDownPickUrlConfigByPage(data) {
  return request({
    url: "/config/downPickUrl/v1.0.0/queryDownPickUrlConfigByPage",
    method: "post",
    data: data,
  });
}

// 贷超链接配置列表查询（用于筛选）
export function queryDownPickUrlConfigList() {
  return request({
    url: "/config/downPickUrl/v1.0.0/queryDownPickUrlConfigList",
    method: "post",
  });
}

// 贷超链接配置启用状态修改
export function updateIsUse(params) {
  return request({
    url: "/config/downPickUrl/v1.0.0/updateIsUse",
    method: "get",
    params,
  });
}
